package com.yilin.tms.core.entity.user.organize;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;
import com.yilin.tms.core.entity.user.account.Account;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author liuxu :)
 * @version 1.0
 * @date 2022-10-27 0027
 */
@Entity
@Table(name = "user_department")
@TableName("user_department")
public class Department extends BaseEntity {
    @Column(name = "department_name")
    private String departmentName;
    @Column(name = "department_manager")
    private String departmentManager;
    @Column(name = "parent_department")
    private String parentDepartment;
    @Column(name = "parent_organize")
    private String parentOrganize;
    //逻辑删除 以后涉及用户的删除都走这种方式
    @TableLogic
    @Column(name = "is_deleted", columnDefinition = "INT default 0")
    private Integer isDeleted;
    @Transient
    @TableField(exist = false)
    private List<Account> staffList; //员工

    public List<Account> getStaffList() {
        return staffList;
    }

    public void setStaffList(List<Account> staffList) {
        this.staffList = staffList;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getDepartmentManager() {
        return departmentManager;
    }

    public void setDepartmentManager(String departmentManager) {
        this.departmentManager = departmentManager;
    }

    public String getParentDepartment() {
        return parentDepartment;
    }

    public void setParentDepartment(String parentDepartment) {
        this.parentDepartment = parentDepartment;
    }

    public String getParentOrganize() {
        return parentOrganize;
    }

    public void setParentOrganize(String parentOrganize) {
        this.parentOrganize = parentOrganize;
    }
}
